home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CU Amiga Super CD-ROM 17
/
CU Amiga Magazine's Super CD-ROM 17 (1997)(EMAP Images)(GB)[!][issue 1997-12].iso
/
CUCD
/
Programming
/
DiceSource
/
src
/
dmake
/
buffer.c
next >
Wrap
C/C++ Source or Header
|
1997-09-09
|
602b
|
36 lines
/*
* (c)Copyright 1992-1997 Obvious Implementations Corp. Redistribution and
* use is allowed under the terms of the DICE-LICENSE FILE,
* DICE-LICENSE.TXT.
*/
/*
*
*/
#include "defs.h"
Prototype char *AllocPathBuffer(void);
Prototype void FreePathBuffer(char *);
List PathBufList = { (Node *)&PathBufList.lh_Tail, NULL, (Node *)&PathBufList.lh_Head };
char *
AllocPathBuffer()
{
Node *node;
if ((node = RemHead(&PathBufList)) == NULL)
node = malloc(PBUFSIZE);
return((char *)node);
}
void
FreePathBuffer(buf)
char *buf;
{
AddTail(&PathBufList, (Node *)buf);
}